package com.cn.springcloudwechat.model.order;

import org.joda.time.DateTime;

import java.util.Date;
/**
*@program: YmOrder
*@author: Administrator
*@create: 2018-07-31 18:22
*/
public class YmOrder {
    /**
     * 订单id
     */
    private Long orderId;
    /**
     * 用户Id
     */
    private Long userId;
    /**
     * 商户订单号
     */
    private String outTradeNo;
    /**
     * 微信订单号
     */
    private String transactionId;
    /**
     * 预支付id
     */
    private String prepayId;
    /**
     * 商品id详情
     */
    private Long goodsIdDesc;
    /**
     * 收货地址
     */
    private String orderAddress;
    /**
     * 收货人姓名
     */
    private String orderName;
    /**
     * 收货人电话
     */
    private String orderPhone;
    /**
     * 支付状态
     */
    private String orderPayState;
    /**
     * 支付方式
     */
    private String orderPayWay;
    /**
     * 支付时间
     */
    private Date payTime;
    /**
     * 支付时间 yyyy-MM-dd
     */
    private String payTimeStr;
    /**
     * 商品总金额
     */
    private Long productCost;
    /**
     *  运费
     */
    private Long tansportationCost;
    /**
     * 订单总金额
     */
    private Long totalCost;
    /**
     *  创建时间
     */
    private Date createTime;

    /**
     *  创建时间Str yyyy-MM-dd
     */
    private String createTimeStr;
    /**
     *  更新时间
     */
    private Date updateTime;
    /**
     * 更新时间Str yyyy-MM-dd
     */
    private String updateTimeStr;
    /**
     * 用户昵称
     */
    private String nickName;

    private Short state;

    public Short getState() {
        return state;
    }

    public YmOrder setState(Short state) {
        this.state = state;
        return this;
    }

    public String getNickName() {
        return nickName;
    }

    public YmOrder setNickName(String nickName) {
        this.nickName = nickName;
        return this;
    }

    public String getCreateTimeStr() {
        return createTimeStr;
    }

    public String getPayTimeStr() {
        return payTimeStr;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getOutTradeNo() {
        return outTradeNo;
    }

    public void setOutTradeNo(String outTradeNo) {
        this.outTradeNo = outTradeNo == null ? null : outTradeNo.trim();
    }

    public String getTransactionId() {
        return transactionId;
    }

    public void setTransactionId(String transactionId) {
        this.transactionId = transactionId == null ? null : transactionId.trim();
    }

    public String getPrepayId() {
        return prepayId;
    }

    public void setPrepayId(String prepayId) {
        this.prepayId = prepayId == null ? null : prepayId.trim();
    }

    public Long getGoodsIdDesc() {
        return goodsIdDesc;
    }

    public void setGoodsIdDesc(Long goodsIdDesc) {
        this.goodsIdDesc = goodsIdDesc;
    }

    public String getOrderAddress() {
        return orderAddress;
    }

    public void setOrderAddress(String orderAddress) {
        this.orderAddress = orderAddress == null ? null : orderAddress.trim();
    }

    public String getOrderName() {
        return orderName;
    }

    public void setOrderName(String orderName) {
        this.orderName = orderName == null ? null : orderName.trim();
    }

    public String getOrderPhone() {
        return orderPhone;
    }

    public void setOrderPhone(String orderPhone) {
        this.orderPhone = orderPhone == null ? null : orderPhone.trim();
    }

    public String getOrderPayState() {
        return orderPayState;
    }

    public void setOrderPayState(String orderPayState) {
        this.orderPayState = orderPayState == null ? null : orderPayState.trim();
    }

    public String getOrderPayWay() {
        return orderPayWay;
    }

    public void setOrderPayWay(String orderPayWay) {
        this.orderPayWay = orderPayWay == null ? null : orderPayWay.trim();
    }

    public Date getPayTime() {
        return payTime;
    }

    public void setPayTime(Date payTime) {
        this.payTimeStr=new DateTime(payTime).toString("yyyy-MM-dd hh:mm:ss");
        this.payTime = payTime;
    }

    public Long getProductCost() {
        return productCost;
    }

    public void setProductCost(Long productCost) {
        this.productCost = productCost;
    }

    public Long getTansportationCost() {
        return tansportationCost;
    }

    public void setTansportationCost(Long tansportationCost) {
        this.tansportationCost = tansportationCost;
    }

    public Long getTotalCost() {
        return totalCost;
    }

    public void setTotalCost(Long totalCost) {
        this.totalCost = totalCost;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTimeStr=new DateTime(createTime).toString("yyyy-MM-dd hh:mm:ss");
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTimeStr=new DateTime(updateTime).toString("yyyy-MM-dd hh:mm:ss");
        this.updateTime = updateTime;
    }
}